<script>
export default {
  name: "avatar",
  props: {
    value: {
      type: String,
      default: '未知'
    }
  }
}
</script>

<template>
  <div class="avatar">
    <span>{{ value.charAt(0) || '未知'}}</span>
  </div>
</template>

<style scoped lang="scss">
.avatar {
  display: flex;
  justify-content: center;

  span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #1482f0;
    border-radius: 100%;
    color: #ffffff;
    font-size: 18px;
  }
}
</style>
